widget: Don't clip widgets anymore when snapshotting
authorBenjamin Otte <otte@redhat.com>
Sat, 31 Mar 2018 16:37:53 +0000 (18:37 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 5 Apr 2018 12:56:38 +0000 (14:56 +0200)
This is the first step in removing clips.

It's seperate to allow bisecting to this commit when analyzing
performance problems.

gtk/gtkwidget.c

index 039bc746fb06a986601428806113722cc63be1f9..4ce4ad2854b321e1c1ec67741fffc963df3bb58f 100644 (file)
@@ -13816,7 +13816,6 @@ gtk_widget_snapshot (GtkWidget   *widget,
                      GtkSnapshot *snapshot)
 {
   GtkWidgetPrivate *priv = widget->priv;
-  graphene_rect_t offset_clip;
   graphene_rect_t clip;
   gboolean has_clip;
   double opacity;
@@ -13831,14 +13830,6 @@ gtk_widget_snapshot (GtkWidget   *widget,
     }
 
   priv = widget->priv;
-  graphene_rect_init (&offset_clip,
-                      priv->clip.x - priv->allocation.x,
-                      priv->clip.y - priv->allocation.y,
-                      priv->clip.width,
-                      priv->clip.height);
-
-  if (gtk_snapshot_clips_rect (snapshot, &offset_clip))
-    return;
 
   opacity = widget->priv->alpha / 255.0;
   if (opacity <= 0.0)